task :update_config, :roles => [:app], :except => {:no_symlink => true} do
  run "rm -f #{release_path}/config/database.yml"
  run "cp -Rf #{shared_path}/config/* #{release_path}/config/"
end

after 'deploy:update_code', :update_config
